package auth

import (
	"gitee.com/jibankyb/keyauth/apps/token"
	"gitee.com/jibankyb/keyauth/client/rpc"
	"github.com/infraboard/mcube/logger"
)

func NewKeyauthAuther(client *rpc.ClientSet, serviceName string) *KeyauthAuther {
	return &KeyauthAuther{
		auth: client.Token(),
		// perm:        client.Policy(),
		// audit:       client.Audit(),
		// log:         zap.L().Named("http.auther"),
		// serviceName: serviceName,
	}
}

// 有Keyauth提供的 HTTP认证中间件
//
type KeyauthAuther struct {
	log  logger.Logger
	auth token.ServiceClient
	// perm        policy.RPCClient
	// audit       audit.RPCClient
	// serviceName string
}
